<template>
  <div class='list'>
    <ul>
      <li v-for="(item, index) in listData" :key="index">
        <p class="switch-box">
          <img class="logo" :src="item.wx_pic" alt="">
          <span v-if="search.state!=1"><van-switch v-model="item.isPassed" active-color="#00998d" /><span class="pr">{{item.isPassed?"通过":"不通过"}}</span></span>
          <span v-else class="fr color-green pr">通过</span>
        </p>
        <p class="clearB"><span class="name pr">{{item.name}}</span></p>
        <p class="clearB"><span>班级：{{item.class}}</span><span class="fr">学号：{{item.number}}</span></p>
        <p class="clearB"><span>学年：{{item.year}}</span></p>

        <p class="clearB bd">
          <span>级别分类: {{item.type | formaltType}}</span>
          <span class="fr">奖励分: <span>{{item.post&&item.post.score||"0"}}</span></span>
        </p>
        <p class="bd">
          <span>部门: {{item.department||"暂无"}}</span>
          <span class="fr">职位名称: <span class="color-yellow">{{item && item.post && item.post.name ||"暂无"}}</span></span>
        </p>
        <p class="clearB imgs bd"><span>工作内容：</span><span>{{item.content}}</span></p>
      </li>
    </ul>
    <p class="no-data" v-show="listData.length==0">暂时没有数据</p>
  </div>
</template>
<script>
export default {
  props:['search','listData','routerDetail'],
  components: {},
  name: "",
  data() {
    return {};
  },
  filters:{
    formaltType(val){
      return ['', '班级干部', '院级干部', '校级干部', '社团组织','实习经验','其他'][val]||"暂无"
    }
  },
  methods: {
    /**
     * @name 预览
     */
    showBigImg(url){
      ImagePreview([url])
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
@import "./scss/list.scss";

.bd{
  position: relative;
}
.bd::before{
  content: "";
  position: absolute;
  width: 8px;
  height: 100%;
  background-color: #FF9C06;
  left: -13px;
  top: 0;
}
</style>